package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.CzEquipmentCapacityMapper;
import com.ruoyi.business.domain.CzEquipmentCapacity;
import com.ruoyi.business.service.ICzEquipmentCapacityService;

/**
 * 设备能力Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-01
 */
@Service
public class CzEquipmentCapacityServiceImpl implements ICzEquipmentCapacityService 
{
    @Autowired
    private CzEquipmentCapacityMapper czEquipmentCapacityMapper;

    /**
     * 查询设备能力
     * 
     * @param equipmentCapacityId 设备能力主键
     * @return 设备能力
     */
    @Override
    public CzEquipmentCapacity selectCzEquipmentCapacityByEquipmentCapacityId(String equipmentCapacityId)
    {
        return czEquipmentCapacityMapper.selectCzEquipmentCapacityByEquipmentCapacityId(equipmentCapacityId);
    }

    /**
     * 查询设备能力列表
     * 
     * @param czEquipmentCapacity 设备能力
     * @return 设备能力
     */
    @Override
    public List<CzEquipmentCapacity> selectCzEquipmentCapacityList(CzEquipmentCapacity czEquipmentCapacity)
    {
        return czEquipmentCapacityMapper.selectCzEquipmentCapacityList(czEquipmentCapacity);
    }

    /**
     * 新增设备能力
     * 
     * @param czEquipmentCapacity 设备能力
     * @return 结果
     */
    @Override
    public int insertCzEquipmentCapacity(CzEquipmentCapacity czEquipmentCapacity)
    {
        czEquipmentCapacity.setCreateTime(DateUtils.getNowDate());
        return czEquipmentCapacityMapper.insertCzEquipmentCapacity(czEquipmentCapacity);
    }

    /**
     * 修改设备能力
     * 
     * @param czEquipmentCapacity 设备能力
     * @return 结果
     */
    @Override
    public int updateCzEquipmentCapacity(CzEquipmentCapacity czEquipmentCapacity)
    {
        czEquipmentCapacity.setUpdateTime(DateUtils.getNowDate());
        return czEquipmentCapacityMapper.updateCzEquipmentCapacity(czEquipmentCapacity);
    }

    /**
     * 批量删除设备能力
     * 
     * @param equipmentCapacityIds 需要删除的设备能力主键
     * @return 结果
     */
    @Override
    public int deleteCzEquipmentCapacityByEquipmentCapacityIds(String[] equipmentCapacityIds)
    {
        return czEquipmentCapacityMapper.deleteCzEquipmentCapacityByEquipmentCapacityIds(equipmentCapacityIds);
    }

    /**
     * 删除设备能力信息
     * 
     * @param equipmentCapacityId 设备能力主键
     * @return 结果
     */
    @Override
    public int deleteCzEquipmentCapacityByEquipmentCapacityId(String equipmentCapacityId)
    {
        return czEquipmentCapacityMapper.deleteCzEquipmentCapacityByEquipmentCapacityId(equipmentCapacityId);
    }
}
